{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from IPython.display import Image"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# CNTK 203: Reinforcement Learning Basics\n",
    "\n",
    "\n",
    "Reinforcement learning (RL) is an area of machine learning inspired by behaviorist psychology, concerned with how [software agents](https://en.wikipedia.org/wiki/Software_agent) ought to take [actions](https://en.wikipedia.org/wiki/Action_selection) in an environment so as to maximize some notion of cumulative reward. In machine learning, the environment is typically formulated as a [Markov decision process](https://en.wikipedia.org/wiki/Markov_decision_process) (MDP) as many reinforcement learning algorithms for this context utilize [dynamic programming](https://en.wikipedia.org/wiki/Dynamic_programming) techniques.\n",
    "\n",
    "In some machine learning settings, we do not have immediate access to labels, so we cannot rely on supervised learning techniques. If, however, there is something we can interact with and thereby get some feedback that tells us occasionally, whether our previous behavior was good or not, we can use RL to learn how to improve our behavior.\n",
    "\n",
    "Unlike in supervised learning, in RL, labeled correct input/output pairs are never presented and sub-optimal actions are never explicitly corrected. This mimics many of the online learning paradigms which involves finding a balance between exploration (of conditions or actions never learnt before) and exploitation (of already learnt conditions or actions from previous encounters). Multi-arm bandit problems is one of the category of RL algorithms where exploration vs. exploitation trade-off have been thoroughly studied. See figure below for [reference](http://www.simongrant.org/pubs/thesis/3/2.html)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cntk.ai/jup/polecart.gif\" width=\"300\" height=\"300\"/>"
      ],
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Figure 1\n",
    "Image(url=\"https://cntk.ai/jup/polecart.gif\", width=300, height=300)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Problem**\n",
    "\n",
    "We will use the [CartPole](https://gym.openai.com/envs/CartPole-v0) environment from OpenAI's [gym](https://github.com/openai/gym) simulator to teach a cart to balance a pole. As described in the link above, in the CartPole example, a pole is attached by an un-actuated joint to a cart, which moves along a frictionless track. The system is controlled by applying a force of +1 or -1 to the cart. A reward of +1 is provided for every timestep that the pole remains upright. The episode ends when the pole is more than 15 degrees from vertical, or the cart moves more than 2.4 units from the center. See figure below for reference.\n",
    "\n",
    "**Goal**\n",
    "\n",
    "Our goal is to prevent the pole from falling over as the cart moves with the pole in upright position (perpendicular to the cart) as the starting state. More specifically if the pole is less than 15 degrees from vertical while the cart is within 2.4 units of the center we will collect reward. In this tutorial, we will train till we learn a set of actions (policies) that lead to an average reward of 200 or more over last 50 batches.\n",
    "\n",
    "In, RL terminology, the goal is to find _policies_ $a$, that maximize the _reward_ $r$ (feedback) through interaction with some environment (in this case the pole being balanced on the cart). So given a series of experiences $$s \\xrightarrow{a} r, s'$$ we then can learn how to choose action $a$ in a given state $s$ to maximize the accumulated reward $r$ over time:\n",
    "\n",
    "$$\n",
    "Q(s,a) = r_0 + \\gamma r_1 + \\gamma^2 r_2 + \\ldots = r_0 + \\gamma \\max_a Q^*(s',a)\n",
    "$$\n",
    "\n",
    "where $\\gamma \\in [0,1)$ is the discount factor that controls how much we should value reward that is further away. This is called the [*Bellmann*-equation](https://en.wikipedia.org/wiki/Bellman_equation).\n",
    "\n",
    "In this tutorial we will show how to model the state space, how to use the received reward to figure out which action yields the highest future reward."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We present two different popular approaches here:\n",
    "\n",
    "**Deep Q-Networks**: DQNs have become famous in 2015 when they were successfully used to train how to play Atari just form raw pixels. We train neural network to learn the $Q(s,a)$ values (thus $Q$-Network ). From these $Q$ functions values we choose the best action.\n",
    "\n",
    "**Policy gradient**: This method directly estimates the policy (set of actions) in the network. The outcome is a learning of an ordered set of actions which leads to maximize reward by probabilistically choosing a subset of actions. In this tutorial, we learn the actions using a gradient descent approach to learn the policies."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this tutorial, we focus how to implement RL in CNTK. We choose a straight forward shallow network. One can extend the approaches by replacing our shallow model with deeper networks that are introduced in other CNTK tutorials.\n",
    "\n",
    "Additionally, this tutorial is in its early stages and will be evolving in future updates.\n",
    "\n",
    "## Prerequisites\n",
    "Please run the following cell from the menu above or select the cell below and hit `Shift + Enter` to ensure the environment is ready. Verify that the following imports work in your notebook."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from __future__ import print_function\n",
    "from __future__ import division\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib import style\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "\n",
    "style.use('ggplot')\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We use the following construct to install the OpenAI gym package if it is not installed. For users new to Jupyter environment, this construct can be used to install any python package. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting gym\n",
      "  Downloading gym-0.9.4.tar.gz (157kB)\n",
      "Requirement already satisfied: numpy>=1.10.4 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from gym)\n",
      "Requirement already satisfied: requests>=2.0 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from gym)\n",
      "Requirement already satisfied: six in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from gym)\n",
      "Collecting pyglet>=1.2.0 (from gym)\n",
      "  Using cached pyglet-1.2.4-py3-none-any.whl\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from requests>=2.0->gym)\n",
      "Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from requests>=2.0->gym)\n",
      "Requirement already satisfied: idna<2.7,>=2.5 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from requests>=2.0->gym)\n",
      "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\\local\\anaconda3-4.1.1-windows-x86_64\\envs\\cntk-py35\\lib\\site-packages (from requests>=2.0->gym)\n",
      "Building wheels for collected packages: gym\n",
      "  Running setup.py bdist_wheel for gym: started\n",
      "  Running setup.py bdist_wheel for gym: finished with status 'done'\n",
      "  Stored in directory: C:\\Users\\yuqtang\\AppData\\Local\\pip\\Cache\\wheels\\ad\\46\\5a\\1833d0ef8149a50e78fdb24a41f47e22a7f4a9dcd649b8db53\n",
      "Successfully built gym\n",
      "Installing collected packages: pyglet, gym\n",
      "Successfully installed gym-0.9.4 pyglet-1.2.4\n"
     ]
    }
   ],
   "source": [
    "try:\n",
    "    import gym\n",
    "except:\n",
    "    !pip install gym\n",
    "    import gym"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Select the notebook run mode**\n",
    "\n",
    "There are two run modes:\n",
    "- *Fast mode*: `isFast` is set to `True`. This is the default mode for the notebooks, which means we train for fewer iterations or train / test on limited data. This ensures functional correctness of the notebook though the models produced are far from what a completed training would produce.\n",
    "\n",
    "- *Slow mode*: We recommend the user to set this flag to `False` once the user has gained familiarity with the notebook content and wants to gain insight from running the notebooks for a longer period with different parameters for training. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "isFast = True"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## CartPole: Data and Environment"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will use the [CartPole](https://gym.openai.com/envs/CartPole-v0) environment from OpenAI's [gym](https://github.com/openai/gym) simulator to teach a cart to balance a pole. Please follow the links to get more details.\n",
    "\n",
    "In every time step, the agent\n",
    " * gets an observation $(x, \\dot{x}, \\theta, \\dot{\\theta})$, corresponding to *cart position*, *cart velocity*, *pole angle with the vertical*, *pole angular velocity*,\n",
    " * performs an action `LEFT` or `RIGHT`, and\n",
    " * receives\n",
    "  * a reward of +1 for having survived another time step, and\n",
    "  * a new state $(x', \\dot{x}', \\theta', \\dot{\\theta}')$\n",
    "\n",
    "The episode ends, if\n",
    " * the pole is more than 15 degrees from vertical and/or\n",
    " * the cart is moving more than 2.4 units from center.\n",
    "\n",
    "The task is considered done, if\n",
    " * the agent achieved and averaged reward of 200 over the last 50 episodes (if you manage to get a reward of 200 averaged over the last 100 episode you can consider submitting it to OpenAI).\n",
    "\n",
    "In fast mode these targets are relaxed."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Part 1: DQN\n",
    "\n",
    "After a transition $(s,a,r,s')$, we are trying to move our value function $Q(s,a)$ closer to our target $r+\\gamma \\max_{a'}Q(s',a')$, where $\\gamma$ is a discount factor for future rewards and ranges in value between 0 and 1.\n",
    "\n",
    "DQNs\n",
    " * learn the _Q-function_ that maps observation (state, action) to a `score`\n",
    " * use memory replay (previously recorded $Q$ values corresponding to different $(s,a)$ to decorrelate experiences (sequence state transitions)\n",
    " * use a second network to stabilize learning (*not* part of this tutorial)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Model: DQN\n",
    "\n",
    "$$\n",
    "l_1 = relu( x W_1 + b_1) \\\\\n",
    "Q(s,a) = l_1 W_2 + b_2 \\\\\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will start with a slightly modified version for Keras, https://github.com/jaara/AI-blog/blob/master/CartPole-basic.py, published by Jaromír Janisch in his [AI blog](https://jaromiru.com/2016/09/27/lets-make-a-dqn-theory/), and will then incrementally convert it to use CNTK.\n",
    "\n",
    "We use a simple two-layer densely connected network, for simpler illustrations. More advance networks can be substituted.\n",
    "\n",
    "**CNTK** concepts: The commented out code is meant to be an illustration of the similarity of concepts between CNTK API/abstractions against Keras. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy\n",
    "import math \n",
    "import os \n",
    "import random\n",
    "\n",
    "import cntk as C"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the block below, we check if we are running this notebook in the CNTK internal test machines by looking for environment variables defined there. We then select the right target device (GPU vs CPU) to test this notebook. In other cases, we use CNTK's default policy to use the best available device (GPU, if available, else CPU)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Select the right target device when this notebook is being tested:\n",
    "if 'TEST_DEVICE' in os.environ:\n",
    "    if os.environ['TEST_DEVICE'] == 'cpu':\n",
    "        C.device.try_set_default_device(C.device.cpu())\n",
    "    else:\n",
    "        C.device.try_set_default_device(C.device.gpu(0))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "STATE_COUNT = 4 (corresponding to $(x, \\dot{x}, \\theta, \\dot{\\theta})$),\n",
    "\n",
    "ACTION_COUNT = 2 (corresponding to `LEFT` or `RIGHT`)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4, 2)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "env = gym.make('CartPole-v0')\n",
    "\n",
    "STATE_COUNT  = env.observation_space.shape[0]\n",
    "ACTION_COUNT = env.action_space.n\n",
    "\n",
    "STATE_COUNT, ACTION_COUNT"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note: in the cell below we highlight how one would do it in Keras. And a marked similarity with CNTK. While CNTK allows for more compact representation, we present a slightly verbose illustration for ease of learning.\n",
    "\n",
    "Additionally, you will note that, CNTK model doesn't need to be compiled explicitly and is implicitly done when data is processed during training.\n",
    "\n",
    "CNTK effectively uses available memory on the system between minibatch execution. Thus the learning rates are stated as **rates per sample** instead of **rates per minibatch** (as with other toolkits)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Targetted reward\n",
    "REWARD_TARGET = 30 if isFast else 200\n",
    "# Averaged over these these many episodes\n",
    "BATCH_SIZE_BASELINE = 20 if isFast else 50\n",
    "\n",
    "H = 64 # hidden layer size\n",
    "\n",
    "class Brain:\n",
    "    def __init__(self):\n",
    "        self.params = {}\n",
    "        self.model, self.trainer, self.loss = self._create()\n",
    "        # self.model.load_weights(\"cartpole-basic.h5\")\n",
    "\n",
    "    def _create(self):\n",
    "        observation = C.sequence.input_variable(STATE_COUNT, np.float32, name=\"s\")\n",
    "        q_target = C.sequence.input_variable(ACTION_COUNT, np.float32, name=\"q\")\n",
    "\n",
    "        # Following a style similar to Keras\n",
    "        l1 = C.layers.Dense(H, activation=C.relu)\n",
    "        l2 = C.layers.Dense(ACTION_COUNT)\n",
    "        unbound_model = C.layers.Sequential([l1, l2])\n",
    "        model = unbound_model(observation)\n",
    "\n",
    "        self.params = dict(W1=l1.W, b1=l1.b, W2=l2.W, b2=l2.b)\n",
    "\n",
    "        # loss='mse'\n",
    "        loss = C.reduce_mean(C.square(model - q_target), axis=0)\n",
    "        meas = C.reduce_mean(C.square(model - q_target), axis=0)\n",
    "\n",
    "        # optimizer\n",
    "        lr = 0.00025\n",
    "        lr_schedule = C.learning_parameter_schedule(lr)\n",
    "        learner = C.sgd(model.parameters, lr_schedule, gradient_clipping_threshold_per_sample=10)\n",
    "        trainer = C.Trainer(model, (loss, meas), learner)\n",
    "\n",
    "        # CNTK: return trainer and loss as well\n",
    "        return model, trainer, loss\n",
    "\n",
    "    def train(self, x, y, epoch=1, verbose=0):\n",
    "        #self.model.fit(x, y, batch_size=64, nb_epoch=epoch, verbose=verbose)\n",
    "        arguments = dict(zip(self.loss.arguments, [x,y]))\n",
    "        updated, results =self.trainer.train_minibatch(arguments, outputs=[self.loss.output])\n",
    "\n",
    "    def predict(self, s):\n",
    "        return self.model.eval([s])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `Memory` class stores the different states, actions and rewards."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "class Memory:   # stored as ( s, a, r, s_ )\n",
    "    samples = []\n",
    "\n",
    "    def __init__(self, capacity):\n",
    "        self.capacity = capacity\n",
    "\n",
    "    def add(self, sample):\n",
    "        self.samples.append(sample)\n",
    "\n",
    "        if len(self.samples) > self.capacity:\n",
    "            self.samples.pop(0)\n",
    "\n",
    "    def sample(self, n):\n",
    "        n = min(n, len(self.samples))\n",
    "        return random.sample(self.samples, n)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `Agent` uses the `Brain` and `Memory` to replay the past actions to choose optimal set of actions that maximize the rewards."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "MEMORY_CAPACITY = 100000\n",
    "BATCH_SIZE = 64\n",
    "\n",
    "GAMMA = 0.99 # discount factor\n",
    "\n",
    "MAX_EPSILON = 1\n",
    "MIN_EPSILON = 0.01 # stay a bit curious even when getting old\n",
    "LAMBDA = 0.0001    # speed of decay\n",
    "\n",
    "class Agent:\n",
    "    steps = 0\n",
    "    epsilon = MAX_EPSILON\n",
    "\n",
    "    def __init__(self):\n",
    "        self.brain = Brain()\n",
    "        self.memory = Memory(MEMORY_CAPACITY)\n",
    "\n",
    "    def act(self, s):\n",
    "        if random.random() < self.epsilon:\n",
    "            return random.randint(0, ACTION_COUNT-1)\n",
    "        else:\n",
    "            return numpy.argmax(self.brain.predict(s))\n",
    "\n",
    "    def observe(self, sample):  # in (s, a, r, s_) format\n",
    "        self.memory.add(sample)\n",
    "\n",
    "        # slowly decrease Epsilon based on our eperience\n",
    "        self.steps += 1\n",
    "        self.epsilon = MIN_EPSILON + (MAX_EPSILON - MIN_EPSILON) * math.exp(-LAMBDA * self.steps)\n",
    "\n",
    "    def replay(self):\n",
    "        batch = self.memory.sample(BATCH_SIZE)\n",
    "        batchLen = len(batch)\n",
    "\n",
    "        no_state = numpy.zeros(STATE_COUNT)\n",
    "\n",
    "\n",
    "        # CNTK: explicitly setting to float32\n",
    "        states = numpy.array([ o[0] for o in batch ], dtype=np.float32)\n",
    "        states_ = numpy.array([(no_state if o[3] is None else o[3]) for o in batch ], dtype=np.float32)\n",
    "\n",
    "        p = agent.brain.predict(states)\n",
    "        p_ = agent.brain.predict(states_)\n",
    "\n",
    "        # CNTK: explicitly setting to float32\n",
    "        x = numpy.zeros((batchLen, STATE_COUNT)).astype(np.float32)\n",
    "        y = numpy.zeros((batchLen, ACTION_COUNT)).astype(np.float32)\n",
    "\n",
    "        for i in range(batchLen):\n",
    "            s, a, r, s_ = batch[i]\n",
    "\n",
    "            # CNTK: [0] because of sequence dimension\n",
    "            t = p[0][i]\n",
    "            if s_ is None:\n",
    "                t[a] = r\n",
    "            else:\n",
    "                t[a] = r + GAMMA * numpy.amax(p_[0][i])\n",
    "\n",
    "            x[i] = s\n",
    "            y[i] = t\n",
    "\n",
    "        self.brain.train(x, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Training\n",
    "\n",
    "As any learning experiences, we expect to see the initial state of actions to be wild exploratory and over the iterations the system learns the range of actions that yield longer runs and collect more rewards. The tutorial below implements the [epsilon-greedy](https://en.wikipedia.org/wiki/Reinforcement_learning) approach (a.k.a. $\\epsilon$-greedy). "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true,
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "def plot_weights(weights, figsize=(7,5)):\n",
    "    '''Heat map of weights to see which neurons play which role'''\n",
    "    sns.set(style=\"white\")\n",
    "    f, ax = plt.subplots(len(weights), figsize=figsize)\n",
    "    cmap = sns.diverging_palette(220, 10, as_cmap=True)\n",
    "    \n",
    "    for i, data in enumerate(weights):\n",
    "        axi = ax if len(weights)==1 else ax[i]\n",
    "        if isinstance(data, tuple):\n",
    "            w, title = data\n",
    "            axi.set_title(title)\n",
    "        else:\n",
    "            w = data\n",
    "                \n",
    "        sns.heatmap(w.asarray(), cmap=cmap, square=True, center=True, #annot=True,\n",
    "                    linewidths=.5, cbar_kws={\"shrink\": .25}, ax=axi)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exploration - exploitation trade-off\n",
    "\n",
    "Note that the initial $\\epsilon$ is set to 1 which implies we are entirely exploring but as steps increase we reduce exploration and start leveraging the learnt space to collect rewards (a.k.a. exploitation) as well."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'$\\\\epsilon$')"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAENCAYAAAAVPvJNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8VOXd///XLAkkJAGSSaiAIm3t\nfYtrbbVWbxQXUBSDCFwsKlAVNygKorhWRCmLCAYVkMWtIHCBC6gIClq9EbVo719V9GeLWiugZiGB\nhECSSeb7xww2pgMkITlnJvN+Ph55mHPmmpnPNQfznnNdZ/GEQiFERETq8rpdgIiIxCYFhIiIRKWA\nEBGRqBQQIiISl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r8ERtV7rfcI3rikEJgMD\nFA4Si7QHIeKgyB7ENdba/3G7FpFD0R6EiIhEpYAQEZGoNMQkIiJRaQ9CRESiUkCIiEhUCggREYlK\nASEiIlEpIEREJCoFhIiIRPX/ACUx34CYedb8AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23270c60668>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def epsilon(steps):\n",
    "    return MIN_EPSILON + (MAX_EPSILON - MIN_EPSILON) * np.exp(-LAMBDA * steps)\n",
    "plt.plot(range(10000), [epsilon(x) for x in range(10000)], 'r')\n",
    "plt.xlabel('step');plt.ylabel('$\\epsilon$')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are now ready to train our agent using **DQN**. Note this would take anywhere between 2-10 min and we stop whenever the learner hits the average reward of 200 over past 50 batches. One would get better results if they could train the learner until say one hits a reward of 200 or higher for say larger number of runs. This is left as an exercise."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Episode: 20, Average reward for episode 21.400000.\n",
      "Episode: 40, Average reward for episode 24.450000.\n",
      "Episode: 60, Average reward for episode 20.250000.\n",
      "Episode: 80, Average reward for episode 20.900000.\n",
      "Episode: 100, Average reward for episode 21.750000.\n",
      "Episode: 120, Average reward for episode 16.400000.\n",
      "Episode: 140, Average reward for episode 21.300000.\n",
      "Episode: 160, Average reward for episode 20.150000.\n",
      "Episode: 180, Average reward for episode 18.250000.\n",
      "Episode: 200, Average reward for episode 16.250000.\n",
      "Episode: 220, Average reward for episode 16.200000.\n",
      "Episode: 240, Average reward for episode 14.000000.\n",
      "Episode: 260, Average reward for episode 14.150000.\n",
      "Episode: 280, Average reward for episode 16.000000.\n",
      "Episode: 300, Average reward for episode 13.800000.\n",
      "Episode: 320, Average reward for episode 13.650000.\n",
      "Episode: 340, Average reward for episode 12.400000.\n",
      "Episode: 360, Average reward for episode 12.900000.\n",
      "Episode: 380, Average reward for episode 13.000000.\n",
      "Episode: 400, Average reward for episode 11.550000.\n",
      "Episode: 420, Average reward for episode 11.400000.\n",
      "Episode: 440, Average reward for episode 12.400000.\n",
      "Episode: 460, Average reward for episode 12.250000.\n",
      "Episode: 480, Average reward for episode 11.650000.\n",
      "Episode: 500, Average reward for episode 11.700000.\n",
      "Episode: 520, Average reward for episode 12.100000.\n",
      "Episode: 540, Average reward for episode 12.650000.\n",
      "Episode: 560, Average reward for episode 11.300000.\n",
      "Episode: 580, Average reward for episode 11.250000.\n",
      "Episode: 600, Average reward for episode 11.000000.\n",
      "Episode: 620, Average reward for episode 11.450000.\n",
      "Episode: 640, Average reward for episode 10.850000.\n",
      "Episode: 660, Average reward for episode 11.850000.\n",
      "Episode: 680, Average reward for episode 12.200000.\n",
      "Episode: 700, Average reward for episode 10.900000.\n",
      "Episode: 720, Average reward for episode 11.700000.\n",
      "Episode: 740, Average reward for episode 11.050000.\n",
      "Episode: 760, Average reward for episode 11.400000.\n",
      "Episode: 780, Average reward for episode 11.650000.\n",
      "Episode: 800, Average reward for episode 11.200000.\n",
      "Episode: 820, Average reward for episode 11.150000.\n",
      "Episode: 840, Average reward for episode 11.900000.\n",
      "Episode: 860, Average reward for episode 11.300000.\n",
      "Episode: 880, Average reward for episode 11.300000.\n",
      "Episode: 900, Average reward for episode 10.900000.\n",
      "Episode: 920, Average reward for episode 11.050000.\n",
      "Episode: 940, Average reward for episode 11.000000.\n",
      "Episode: 960, Average reward for episode 11.350000.\n",
      "Episode: 980, Average reward for episode 9.700000.\n",
      "Episode: 1000, Average reward for episode 12.250000.\n",
      "Episode: 1020, Average reward for episode 10.700000.\n",
      "Episode: 1040, Average reward for episode 10.900000.\n",
      "Episode: 1060, Average reward for episode 11.750000.\n",
      "Episode: 1080, Average reward for episode 10.900000.\n",
      "Episode: 1100, Average reward for episode 10.900000.\n",
      "Episode: 1120, Average reward for episode 12.050000.\n",
      "Episode: 1140, Average reward for episode 11.550000.\n",
      "Episode: 1160, Average reward for episode 12.000000.\n",
      "Episode: 1180, Average reward for episode 12.750000.\n",
      "Episode: 1200, Average reward for episode 13.400000.\n",
      "Episode: 1220, Average reward for episode 14.100000.\n",
      "Episode: 1240, Average reward for episode 25.950000.\n",
      "Episode: 1260, Average reward for episode 22.700000.\n",
      "Episode: 1280, Average reward for episode 13.850000.\n",
      "Episode: 1300, Average reward for episode 10.350000.\n",
      "Episode: 1320, Average reward for episode 11.600000.\n",
      "Episode: 1340, Average reward for episode 114.150000.\n",
      "Task solved in 1340 episodes\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABWCAYAAADxAzG5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XlcVOX+B/DPMIgLi6TmTa+5h1rm\ngl1vFpKoaHIVETcwESPFBcUFiUVUBAQhl7JyQU0FFzAt0fSKGCq53jSpUDFLsy7dTEWvDKYs8/z+\nmOvkjMPMmXNcoN/n/XrN6+XMeeZ7npnvPGcezzycr0oIIUBERERERA+VzZPuABERERHRnxEn2kRE\nREREjwAn2kREREREjwAn2kREREREjwAn2kREREREjwAn2kREREREjwAn2kREREREjwAn2kRENYC3\ntzf27dunv19YWIh27dphx44d+scuXLiArl274tatW0+ii0REZMT2SXeAiOh+7dq1g4uLC2xsDM8D\nfPjhh2jWrJnJ53z77bdYvXo1li1b9lD6sHfvXmzatAnp6emSn5OVlYW1a9dCpVKhbt26mD17Nl58\n8UUAwMGDB7F48WKUlZWhXbt2SExMhIODg8Vt93NyckJJSYn+/oYNG+Do6GjwWHp6Onx8fODk5CT3\npRMRVXsf7jticD+k36tVttVqtYiNjcX58+dhZ2eHhIQEtGjR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T0dERHR+Pll19GcHCw7HilpaV44YUXcPLkSQC6PDz33HOyYpWXl6NZs2ao\nV68eAOvzYGrO0KNHD1njwVSsvLy8h/L9XN3UpKUjj+2qI56enjhy5Aj8/PwghEBiYqLsWCtXrsSt\nW7ewfPlyLF++HACwevVq1KlT52F1VzYPDw98+eWXGDZsGIQQmDt3rqI15GPHjkV0dDRGjRqF8vJy\nzJgxQz+g5YqIiMCcOXOwZMkStG7dGv3795cdq7KyEgsWLECTJk30a+f+9re/ITQ0VFEfH5aIiAjE\nxMQgIyMDDg4OWLx4sexYCQkJmDFjBmxtbVGrVi39mlUpTH1mZ8+ejYSEBFl5MI5XWVmJCxcuoGnT\nplbn4WGPJ1PxFi5cKCsPpmIpyUO/fv0QFRWFN954AxUVFYiOjkabNm1kjQdTsaKjo2WPBVPx5K6n\nNBWrQ4cOsseCqXjOzs6y82DsYR6TtFotj0kSDBs2DFFRUfD394dKpUJiYiJsbGwwa9YsVFZWws3N\nDZ07d5YdLy4uDkFBQXj++ecxfvx4AMCAAQMwatQoWX1T8gu4qXj16tXD/PnzUVlZiWbNmmHWrFmy\nYi1atAjXr19HUFAQateuDUdHR6t+WTA1Z2jWrJms8WAqVlhYWLUdC0pU9+Ui91OJmtRbIiIiIqIa\n4rEtHSEiIiIi+v+EE20iIiIiokeAE20iIiIiokeAE20iIiIiokeAE20iIiIiokeAE20iIiIiokeA\nE20iIiIiokeAE20iIiIiokfg/wBi49/1fqyZiQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2326d0f0b70>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABYCAYAAADLCVDJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5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sPJiKZUseevTogejoaLz33nsoKytD\nTEwMmjdvLms8mIoVExMjeyyYiid3PaWpWK1atZI9FkzFc3V1lZ0HY0/ymKTVanlMkiAgIADR0dEI\nDg6GQqFAQkIC7OzsMHnyZJSXl8PT0xOvvfaa7HizZs1CaGgoWrdujeHDhwMAevXqhZCQEFl9s+Uv\n4Kbi1axZEzNnzkR5eTkaNWqEyZMny4q1YMEC3Lp1C6GhoXB0dISzs7NVf1kwNWdo1KiRrPFgKtak\nSZOe2bFgC2uWi3z66afYuHGjwbY6deroT2I+bnmOUqnEokWLsGnTJkydOhWAbhm0pccZUwhbFhAT\nEREREVUhY8eOxYgRI9C2bVsUFhYiODgYe/bsMdm2qKgIAwcOxMqVKzFu3DisXbsWderUQV5eHhYt\nWqT/a9/j/GlLR4iIiIiInjYPDw/9Eq7s7Gx06NDBYP+JEycwc+ZMAICjoyOUSiUUCoXFx5nCM9pE\nRERE9D/j/v37+h9OV6tWDYmJiahXrx7mz5+Pd955B6+88gpmzZqFS5cuQavVIiAgAAMGDMDNmzcR\nGRkJjUaD5557DomJiRaX83KiTURERERUCbh0hIiIiIioEnCiTURERERUCTjRJiIiIiKqBJxoExER\nERFVAk60iYiIiIgqASfaRERERESVgBNtIiIiIqJK8P8AH8R5fjyuSU4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2326d20c198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABXCAYAAAA6X+IcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8U1X6+PFP2tIiXagIzsAgCGhx\nQWVxUMZSRShIB1lKgRYJm5R9p0xp2dtSlilFZC87ZWkRF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re/tbb9\n7W9/S2FhISaTyek2ezcn2sXFxWRlZdGjRw/8/f0pLCzEbDazbt06evbsSUFBAVFRUTRq1IhvvvnG\nw0wIIcSDRyllc3PGbDYzadIkunXrhtFo5Ny5czbb161bR+fOnYmKimLv3r0AXL9+nWHDhtG9e3di\nY2PJz8/X3VeZaAshHjj2p44sWLDAuu2pp57ixRdfBKBz586cOnWKX375xbq9SZMmfPvttxiNRjIy\nMujVqxe1a9fm4MGDREREUKVKFQAiIyO5cOEC//znPzl69Cjh4eEEBATg4+ND586dActK9U8//UTv\n3r3p0KEDcXFxGAwGfvjhB5v+lpSUsH//frp168b7779Pjx496N+/P0VFRZjN5ttWpwG8vLycbrMX\nGBiIyWQiJyeHp556irp16xIQEEBBQQH79u3D29ubsLAwKlasSEZGBm3atNHxzgshxIPPrJTNzZnd\nu3dTVFREdnY2Y8aMYcaMGdZt+fn5rF+/nqysLFatWsWUKVNQSrFhwwZCQkJYv349HTt2ZOHChbr7\nKhNtIUS54u3t7fSxxx57jF27dtG/f38KCwvp06cPe/bswWw23/Y8pRQlJSXW/9vHM5vNNGvWzGbS\nv3HjRp588kmbOI8++ij16tXjhRdeAKBVq1aUlpby448/Ur16devpHQAXLlygcuXKVKpUyek2ezfP\n0V6zZg09e/a0eWzt2rUYjUYMBgMVKlSwfpkQQohfI3dWtE+cOEHz5s0BaNiwIXl5edZtVapUYevW\nrVSoUIFLly4RFBSEwWCweU5YWBhHjx7V3VeZaAshypXTp09z+vRpALKzs2nUqBGBgYHW7evXrych\nIYHQ0FDGjh1LaGgoJ0+epHnz5nz88cfWXwFu3rzZej52WFgYO3bs4MqVK5jNZrZu3QpAs2bNOHz4\nMH//+98B2L9/P+3bt+f69es2fQoLC+Of//yndQf++eefYzAYqFmzJqGhoXz11Vf84x//ACznV7ds\n2RLA6TZ7gYGBfPHFFxQWFhIaGgpYJtqnTp3ib3/7G506dfL0rRVCiHLBnRXtwsJCmys5eXt7WxdY\nAHx8fFi7di3dunWz/iawsLDQel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97xk+fLhHfbxb4uPjmTBhAllZ\nWQQEBDB79mzdsVJSUhg1ahQ+Pj5UqFDBes6qFo4+s+PHjyclJUVXHuzjlZaWcvbsWWrUqOF2Hu72\neHIUb8aMGbry4CiWJ3lo3bo1CQkJvPXWW5SUlJCYmEi9evV0jQdHsRITE3WPBUfx9J5P6SjW008/\nrXssOIoXHBysOw/27uY+yWw2yz5Jg6ioKBISEoiJicFgMJCamoqXlxdxcXGUlpYSGhrKCy+8oDte\nUlISffv25ZlnniE2NhaAtm3b0r17d1198+Q34I7iVapUialTp1JaWkrNmjWJi4vTFSstLY3Lly/T\nt29f/Pz8CAwMdOs3C47mDDVr1tQ1HhzFGjNmzAM7FjzhacGaxo0bs3//fp5//nkOHDhAkyZNbLYf\nPXqUnTt3MnnyZPz8/PDx8cFgMFifFxkZ6fB5jhiUJycQCyGEEEIIUY5cu3bNeppZhQoVmD17NtWq\nVWPWrFm88cYbPPvssyQlJXHmzBnMZjNRUVF07dqVS5cuER8fj8lk4uGHH2b27NkuFz9loi2EEEII\nIUQZkMqQQgghhBBClAGZaAshhBBCCFEGZKIthBBCCCFEGZCJthBCCCGEEGVAJtpCCCGEEEKUAZlo\nCyGEEEIIUQZkoi2EEEIIIUQZkIm2EEIIIYQQZeD/AVcHa6LwOmfwAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x232781cb400>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABWCAYAAADxAzG5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XlcU1f6P/BPWFVWcZnqUFyLa62i\nY2uLtKhYdVDRisUlirbu+zaIQkWJLFa07hXrCi5otVJ3sS7UpUyl2ikqaG2r1s7XougIcWHJ+f2R\nHxkT483NTV3ofN595fVqcs99cpIn5+Z4ObmPSgghQEREREREfyi7590BIiIiIqI/I060iYiIiIie\nAk60iYiIiIieAk60iYiIiIieAk60iYiIiIieAk60iYiIiIieAk60iYiIiIieAk60iYgqgB49euDg\nwYOG+7m5uWjUqBF27txpeOzSpUto1aoV7t69+zy6SEREJhyedweIiB7VqFEj+Pr6ws7O+DzAsmXL\n4O3tbXafH374AatWrcLixYv/kD7s378fGzduREpKiux9MjIysHjxYtjZ2cHDwwMajQY+Pj4AgKNH\njyIpKQnFxcVo1KgR4uLi4OrqanHbo9zd3VFYWGi4v379eri5uRk9lpKSgpCQELi7uyt96UREL7x1\nx741uh/+9t+eU08s4xltInrhrF+/Hunp6Ua3J02yAeDVV1/9wybZSjx48ADTpk3D0qVLkZ6ejg4d\nOkCj0QAACgoKEBkZiSVLluDAgQN4+eWXMX/+fIvbTLm6uqKoqMiw35EjR9C7d2/DRPvu3bvYtWsX\nBg4c+AxeMRHR86MTwuj2IuNEm4gqjKysLISGhmLChAno3r07QkNDcfnyZWRlZSE4OBgAoNVqMX78\nePTs2RO9evVCVFQUdDodACAtLQ3BwcHo0aMHhg4dip9//tkQe9GiRejUqRP69OmDjIwMw+OHDx9G\naGgoQkJCEBYWhjNnzjzWr7KyMgghDJNerVYLZ2dnAMDx48fx6quvom7dugCAfv36YdeuXRBCSG4z\n5ebmZphob9myBd26dUPt2rUNj23fvh1+fn5o0KCBLW8xEdELTwjj24uMS0eI6IUzePBgo6Uj3t7e\nWLZsGQAgJycHERERaNOmDTZv3oxp06YhIiLC0DYjIwNarRbp6ekoKyvDrFmzcO3aNfz222/47LPP\nkJaWBi8vL+zYsQNjxozBnj178NVXX+HgwYPYuXMnKlWqhDFjxgAAfvnlFyxcuBAbNmxA1apVcenS\nJQwZMgQHDx5ElSpVDM/p4uKC2bNnIywsDJ6entDpdNi8eTMA4P/+7//w0ksvGdq+9NJLKCoqglar\nldx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QQmDSpEk2LUvRarWYMWMG8vPzUVJSgkGDBik6g//rr79i8uTJ2Lp1K37++WdER0ejpKQE\n9evXh0ajsfrPceXxNm/ejHbt2qFWrVqGf9n97W9/w/jx4xX1TeoxJfGuX7+OqKgo3L9/H66urkhK\nSoKHh4eiWKdPnzb8stzR0RGxsbHw9vaWFcfcZ3bmzJnQaDSK8mAar6ysDJcuXULt2rWtzoPUeFKS\nB3PxEhISFOXBXKwJEyYozsO9e/cQGRmJmzdvorS0FMOGDUODBg0UjQdzsWbMmKF4LJiL16lTJwDW\njwdzsZo0aaJ4LJiL5+npqTgP5cqPuXZ2djYfk8rjffTRRxgwYIBNx6RH+1b+fWDLMenReJUqVbLp\nmPRorPL140pyUFxcjMjISPz2229QqVSYOnUq7OzsEBcXh7KyMvj7+1t19QzTeBMnTsTQoUPRtGlT\nw5nsrl27on///or65ufnBwDIysrCli1brLrqiLl4VapUwezZs1FWVgZvb28kJCTAyclJUaxbt24h\nOTkZzs7OcHNzQ0JCglU5NZ0zeHt7Kx4PprGmTJli81h4Eb0Ts9To/tEY666Qc//+fcNfvxwdHZGU\nlIQaNWpg3rx56NKlC5o1a4Y5c+YgLy8POp0Offr0Qd++fXHz5k1ERERAq9WiatWqSEpKMvwj60me\n2USbiIiIiOh/CStDEhERERE9BZxoExERERE9BZxoExERERE9BZxoExERERE9BZxoExERERE9BZxo\nExERERE9BZxoExERERE9BZxoExERERE9Bf8P56726GnDYFMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23279b8bd30>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABXCAYAAAA6X+IcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW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//hXjxo2z\nq49PS0REBKKjo5GamgpXV1ckJCSojhUTE4OJEydCq9XCycnJdM6qEtY+s9OmTUNMTIyqPFjGKy4u\nxpUrV1CnTh2b8/C0x5O1ePPmzVOVB2ux7MlDx44dERkZiY8//hhFRUWIiopC48aNVY0Ha7GioqJU\njwVr8dSeT2ktVrNmzVSPBWvxPDw8VOfB0tPcJhkMBm6TFAgODkZkZCT69u0LjUaD2NhYODg4IDw8\nHMXFxfD29sYbb7yhOt7s2bMxePBgNG/eHEOHDgUAdOnSBf369VPVN3u+AbcWr2rVqvj0009RXFyM\nunXrIjw8XFWs+Ph43L59G4MHD0alSpXg5uZm0zcL1uYMdevWVTUerMWaPHlyuR0L9rD3qiNeXl7I\nyMhAq1atkJmZibZt25otz8rKwv79+zFz5kxUqlQJWq0WGo3GtF6PHj2srmeNRthzAjERERERUQXy\n4MED02lmTk5OSEhIQK1atbBgwQJ07twZLVq0wOzZs3Hp0iUYDAYEBwejd+/euHXrFiIiIqDX6/HC\nCy8gISFB9uAnJ9pERERERGWAJdiJiIiIiMoAJ9pERERERGWAE20iIiIiojLAiTYRERERURngRJuI\niIiIqAxwok1EREREVAY40SYiIiIiKgOcaBMRERERlYH/B0L+ckgQkQqfAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23279b6c748>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABXCAYAAAA6X+IcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8jOf6P/DPJJNYskgJpxy1N9Yq\n0aPVRio0tkakaRBqBCX2qO1EFhURIkS02gYptURIbI2iB7ElaDio9NSSVKtF9VQRjsxYssz9/W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r64+d+8c//oGwsDCb+vik\nhIeHIzo6Gunp6XB2dsbixYtlx4qLi8OUKVOgVCrh4OCgP2ZVClPv2aioKMTFxcnKg3G8srIyXLhw\nAQ0aNLA6D096PJmKt2DBAll5MBXLljz07NkTEREReO+991BaWorIyEg0b95c1ngwFSsyMlL2WDAV\nT+7xlKZitW7dWvZYMBXPzc1Ndh6MPcl9klar5T5JgqCgIERERGDw4MFQKBSYP38+7OzsMH36dJSV\nlcHLywsvv/yy7HixsbEYOXIk2rRpg9GjRwMA+vTpgyFDhsjqmy3fgJuKV7NmTcyZMwdlZWVo2LAh\npk+fLitWYmIibt68iZEjR6JatWpwcXGx6psFU3OGhg0byhoPpmJNmzat0o4FW9hasMbT0xPZ2dlo\n3749cnJy0KlTJ4Pbc3NzsXfvXsyePRvVqlWDUqmEQqHQ3y8wMNDk/UxRCFsOICYiIiIieoq6xXxq\ncP1QjHWnorx3757+MDMHBwcsXrwYdevWxcKFC9G7d2+0bdsWsbGxKCgogFarRVBQEAYOHIgbN24g\nPDwcGo0Gzz33HBYvXmxx8ZMTbSIiIiKiCsAS7EREREREFYATbSIiIiKiCsCJNhERERFRBeBEm4iI\niIioAnCiTURERERUATjRJiIiIiKqAJxoExERERFVAE60iYiIiIgqwP8B4bxivpemLwsAAAAASUVO\nRK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23279da7cc0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAABWCAYAAADxAzG5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XtclGXe+PHPAOIBUFLXzdZTWlib\nlWHrkxtQpKSyKIiSeEDNs+IhD6yiqCgIYh7b0sQ8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g2U5+HRRx/VFau0tJRmzZpRr149wPE8WFszdOrUSdd4sBbryJEjv8nnc3WjlOXNUf36\n9ePixYv069ePzMxM8w9/Fy5cyKeffkrHjh0xmUxERkYyYMAABgwYQPPmzRkzZgy7d+8mMjKSs2fP\nMnDgQLvPZVDOnNfggIqrjnzxxRcopUhKStJ9dY/ExEQ+/PBDi69nVq9eTZ06dZzqY1RUFPHx8U5f\ndWThwoXk5OSglGLSpElOnZZSVFTEjBkzuHr1KqWlpQwaNEjXEfx//etfTJ48mS1btnDp0iVmzZpF\naWkprVu3JjEx0eGv4yripaen06lTJ5o2bWr+V/ef/vQnJkyYoKtvtrbpiVdQUEBcXBy//vornp6e\nLF68mAYNGuiKdfr0afMvy2vVqkVCQgLNmjXTFMfae3bmzJkkJibqykPVeGVlZVy8eJGHHnrI4TzY\nGk968mAt3oIFC3TlwVqsiRMn6s7DL7/8QmxsLD/++CO3bt1ixIgRtGnTRtd4sBZrxowZuseCtXhd\nunQBHB8P1mI9/vjjuseCtXje3t6681ChYs51cXFxek6qiDd79mwGDBjg1JxUuW8VnwfOzEmV49Wp\nU8epOalyrIrzx/XkoKSkhNjYWL7//nsMBgNTp07FxcWFpKQkysrK8PPzc+jqGVXjvfbaawwdOpQ/\n/vGP5iPZ3bt3p3///rr65uvrC0BOTg4ZGRkOXXXEWrx69eoxd+5cysrKaNasGQsWLMDd3V1XrGvX\nrpGamkrt2rXx8vJiwYIFDuW06pqhWbNmusdD1VhTpkxxeixUR4Fz37K4f3BO9H3qiX33bKEthBBC\nCCHE/yX37NQRIYQQQggh/i+RhbYQQgghhBB3gSy0hRBCCCGEuAtkoS2EEEIIIcRdIAttIYQQQggh\n7gJZaAshhBBCCHEXyEJbCCGEEEKIu0AW2kIIIYQQQtwF/w+l7tRBvwa3jQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2327a29d630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "TOTAL_EPISODES = 2000 if isFast else 3000\n",
    "\n",
    "def run(agent):\n",
    "    s = env.reset()\n",
    "    R = 0\n",
    "\n",
    "    while True:\n",
    "        # Uncomment the line below to visualize the cartpole\n",
    "        # env.render()\n",
    "\n",
    "        # CNTK: explicitly setting to float32\n",
    "        a = agent.act(s.astype(np.float32))\n",
    "\n",
    "        s_, r, done, info = env.step(a)\n",
    "\n",
    "        if done: # terminal state\n",
    "            s_ = None\n",
    "\n",
    "        agent.observe((s, a, r, s_))\n",
    "        agent.replay()\n",
    "\n",
    "        s = s_\n",
    "        R += r\n",
    "\n",
    "        if done:\n",
    "            return R\n",
    "\n",
    "agent = Agent()\n",
    "\n",
    "episode_number = 0\n",
    "reward_sum = 0\n",
    "while episode_number < TOTAL_EPISODES:\n",
    "    reward_sum += run(agent)\n",
    "    episode_number += 1\n",
    "    if episode_number % BATCH_SIZE_BASELINE == 0:\n",
    "        print('Episode: %d, Average reward for episode %f.' % (episode_number,\n",
    "                                                               reward_sum / BATCH_SIZE_BASELINE))\n",
    "        if episode_number%200==0:\n",
    "            plot_weights([(agent.brain.params['W1'], 'Episode %i $W_1$'%episode_number)], figsize=(14,5))\n",
    "        if reward_sum / BATCH_SIZE_BASELINE > REWARD_TARGET:\n",
    "            print('Task solved in %d episodes' % episode_number)\n",
    "            plot_weights([(agent.brain.params['W1'], 'Episode %i $W_1$'%episode_number)], figsize=(14,5))\n",
    "            break\n",
    "        reward_sum = 0\n",
    "agent.brain.model.save('dqn.mod')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you run it, you should see something like\n",
    "```\n",
    "Episode: 20, Average reward for episode 20.700000.\n",
    "Episode: 40, Average reward for episode 20.150000.\n",
    "Episode: 60, Average reward for episode 21.100000.\n",
    "...\n",
    "Episode: 960, Average reward for episode 20.150000.\n",
    "Episode: 980, Average reward for episode 26.700000.\n",
    "Episode: 1000, Average reward for episode 32.900000.\n",
    "Task solved in 1000 episodes\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Task 1.1**\n",
    "Rewrite the model without using the layer lib.\n",
    "\n",
    "**Task 1.2**\n",
    "Play with different [learners](https://cntk.ai/pythondocs/cntk.learner.html#module-cntk.learner). Which one works better? Worse? Think about which parameters you would need to adapt when switching from one learner to the other."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running the DQN model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n",
      "9\n"
     ]
    }
   ],
   "source": [
    "env = gym.make('CartPole-v0')\n",
    "\n",
    "num_episodes = 10  # number of episodes to run\n",
    "\n",
    "modelPath = 'dqn.mod'\n",
    "root = C.load_model(modelPath)\n",
    "\n",
    "for i_episode in range(num_episodes):\n",
    "    print(i_episode)\n",
    "    observation = env.reset()  # reset environment for new episode\n",
    "    done = False\n",
    "    while not done: \n",
    "        if not 'TEST_DEVICE' in os.environ:\n",
    "            env.render()\n",
    "        action = np.argmax(root.eval([observation.astype(np.float32)]))\n",
    "        observation, reward, done, info  = env.step(action)    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Part 2: Policy gradient (PG)\n",
    "**Goal:**\n",
    "$$\n",
    "\\text{maximize } E [R | \\pi_\\theta]\n",
    "$$\n",
    "\n",
    "**Approach:**\n",
    "1. Collect experience (sample a bunch of trajectories through $(s,a)$ space)\n",
    "2. Update the policy so that _good_ experiences become more probable\n",
    "\n",
    "**Difference to DQN:**\n",
    " * we don't consider single $(s,a,r,s')$ transitions, but rather use whole episodes for the gradient updates\n",
    " * our parameters directly model the policy (output is an action probability), whereas in DQN they model the value function (output is raw score)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Rewards\n",
    "\n",
    "Remember, we get +1 reward for every time step, in which we still were in the game.\n",
    "\n",
    "The problem: we normally do not know, which action led to a continuation of the game, and which was actually a bad one. Our simple heuristic: actions in the beginning of the episode are good, and those towards the end are likely bad (they led to losing the game after all)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def discount_rewards(r, gamma=0.999):\n",
    "    \"\"\"Take 1D float array of rewards and compute discounted reward \"\"\"\n",
    "    discounted_r = np.zeros_like(r)\n",
    "    running_add = 0\n",
    "    for t in reversed(range(0, r.size)):\n",
    "        running_add = running_add * gamma + r[t]\n",
    "        discounted_r[t] = running_add\n",
    "    return discounted_r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2327a7ad128>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAT8AAACLCAYAAAAXip58AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAADnRJREFUeJzt3X9MVfX/B/DnFbqC92KMRbONrmGT\nZTKX2Ir8hQwUKw1CfpO3xBiSRvqH48eI9KuJLNtKNgJt2nZ1CR/AcmuTUbFILOc0FAkqUFyisKuy\n4bnivdfL+/vHZ968H03lco6K7+fjL+55353X6/rjufe55764OiGEABGRZMY96AaIiB4Ehh8RSYnh\nR0RSYvgRkZQYfkQkJd8H3QAAXLt2DadOnUJwcDB8fHwedDtE9IhwuVywWq0IDw+Hn5+fx9pDEX6n\nTp1CZmbmg26DiB5Re/fuxYsvvuhx7J7C78SJE9i2bRssFgvOnj2LgoIC6HQ6TJ06FR999BHGjfvn\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chm\nz56teZ2JEye6bxw9/vjjuH79+m1/aYBa2traMGvWLFgsFsTGxuLpp59W7dxjcru0cOFCtLS0IC0t\nzT1e9yiprKzE4OAgKioqUFFRAQDYuXMn/Pz8NKm3aNEiFBYWIjMzE9evX0dRURHGjx+vSa0HISkp\nCYWFhUhPT4dOp8OWLVs0u1KIjo7G0aNHkZSUBCEESkpK7su8+pkzZxASEqJ5nXfeeQdFRUXIyMiA\n0+nEunXrMGHCBM3qTZ48GZ9//jl27dqFgIAAfPzxx6qdm+NtRCSlMXnZS0Q0Wgw/IpISw4+IpMTw\nIyIpMfyISEoMPyKSEsOPiKTE8CMiKf0/4k4gmJwqa3AAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2327a0c3048>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "discounted_epr = discount_rewards(np.ones(10))\n",
    "f, ax = plt.subplots(1, figsize=(5,2))\n",
    "sns.barplot(list(range(10)), discounted_epr, color=\"steelblue\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We normalize the rewards so that they tank below zero towards the end. gamma controls how late the rewards tank."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2327a4dfe48>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATcAAACLCAYAAAAEXd6IAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAACaJJREFUeJzt221Ilfcfx/HP8YhZO5VEjh6YZgNB\n6kFY0Bi5G2Z3Y9UoD9NJEkasm1GNG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CkvwHhkgHORuxDBAAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2327a502b38>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "discounted_epr_cent = discounted_epr - np.mean(discounted_epr)\n",
    "discounted_epr_norm = discounted_epr_cent/np.std(discounted_epr_cent)\n",
    "f, ax = plt.subplots(1, figsize=(5,2))\n",
    "sns.barplot(list(range(10)), discounted_epr_norm, color=\"steelblue\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x23279db20f0>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATcAAADBCAYAAACqnveCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAEQBJREFUeJzt3W1IlNnDBvBrUtRsNIkMP5imgfwl\nWdqMpQ3thUxr6W1LSRNFjEgzrDZcddZEVtNkW9gMXDVwWyb512b28kkxEkpDcCNFwVo0g9QUS8Gd\nUmccz/Nh0aee6qm9u89kx+v3bWb0vo6jXJ5zv8xtEEIIEBEpZt6nHgARkQwsNyJSEsuNiJTEciMi\nJbHciEhJzo4IGR8fR0dHB7y9veHk5OSISCKaA+x2O4aGhhASEgI3N7fXXtNUbjabDSaTCX19fbBa\nrUhNTcWmTZve+fUdHR2Ij4/XEkVE9F5VVVVYvXr1a89pKrcbN27Ay8sLP/30E0ZGRvDtt9/+v+Xm\n7e09MwAfHx8tkUREbxgYGEB8fPxMx7xKU7lt2bIFUVFRM4/ft9Scft3Hxwe+vr5aIomI3ultHaSp\n3BYsWAAAsFg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yIlsdyISEksNyJSEsuNiJTEciMiJbHciEhJLDciUtL/ADahaAamiQxl\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2327a4ebbe0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "discounted_epr = discount_rewards(np.ones(10), gamma=0.5)\n",
    "discounted_epr_cent = discounted_epr - np.mean(discounted_epr)\n",
    "discounted_epr_norm = discounted_epr_cent/np.std(discounted_epr_cent)\n",
    "f, ax = plt.subplots(2, figsize=(5,3))\n",
    "sns.barplot(list(range(10)), discounted_epr, color=\"steelblue\", ax=ax[0])\n",
    "sns.barplot(list(range(10)), discounted_epr_norm, color=\"steelblue\", ax=ax[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Model: Policy Gradient\n",
    "\n",
    "$$\n",
    "l_1 = relu( x W_1 + b_1) \\\\\n",
    "l_2 = l_1 W_2 + b_2 \\\\\n",
    "\\pi(a|s) = sigmoid(l_2)\n",
    "$$\n",
    "\n",
    "Note: in policy gradient approach, the output of the dense layer is mapped into to a 0-1 range via the sigmoid function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "TOTAL_EPISODES = 2000 if isFast else 10000\n",
    "\n",
    "D = 4  # input dimensionality\n",
    "H = 10 # number of hidden layer neurons\n",
    "\n",
    "observations = C.sequence.input_variable(STATE_COUNT, np.float32, name=\"obs\")\n",
    "\n",
    "W1 = C.parameter(shape=(STATE_COUNT, H), init=C.glorot_uniform(), name=\"W1\")\n",
    "b1 = C.parameter(shape=H, name=\"b1\")\n",
    "layer1 = C.relu(C.times(observations, W1) + b1)\n",
    "\n",
    "W2 = C.parameter(shape=(H, ACTION_COUNT), init=C.glorot_uniform(), name=\"W2\")\n",
    "b2 = C.parameter(shape=ACTION_COUNT, name=\"b2\")\n",
    "score = C.times(layer1, W2) + b2\n",
    "# Until here it was similar to DQN\n",
    "\n",
    "probability = C.sigmoid(score, name=\"prob\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running the PG model\n",
    "\n",
    "**Policy Search**: The optimal policy search can be carried out with either gradient free approaches or by computing gradients over the policy space ($\\pi_\\theta$) which is parameterized by $\\theta$. In this tutorial, we use the classic forward (`loss.forward`) and back (`loss.backward`) propagation of errors over the parameterized space $\\theta$. In this case, $\\theta = \\{W_1, b_1, W_2, b_2\\}$, our model parameters.  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Episode: 20. Average reward for episode 24.550000.\n",
      "Episode: 40. Average reward for episode 18.700000.\n",
      "Episode: 60. Average reward for episode 20.750000.\n",
      "Episode: 80. Average reward for episode 19.300000.\n",
      "Episode: 100. Average reward for episode 19.750000.\n",
      "Episode: 120. Average reward for episode 20.850000.\n",
      "Episode: 140. Average reward for episode 20.150000.\n",
      "Episode: 160. Average reward for episode 19.650000.\n",
      "Episode: 180. Average reward for episode 15.150000.\n",
      "Episode: 200. Average reward for episode 20.700000.\n",
      "Episode: 220. Average reward for episode 18.500000.\n",
      "Episode: 240. Average reward for episode 20.350000.\n",
      "Episode: 260. Average reward for episode 17.700000.\n",
      "Episode: 280. Average reward for episode 15.900000.\n",
      "Episode: 300. Average reward for episode 21.700000.\n",
      "Episode: 320. Average reward for episode 17.900000.\n",
      "Episode: 340. Average reward for episode 17.850000.\n",
      "Episode: 360. Average reward for episode 16.050000.\n",
      "Episode: 380. Average reward for episode 19.450000.\n",
      "Episode: 400. Average reward for episode 19.150000.\n",
      "Episode: 420. Average reward for episode 18.950000.\n",
      "Episode: 440. Average reward for episode 19.400000.\n",
      "Episode: 460. Average reward for episode 21.550000.\n",
      "Episode: 480. Average reward for episode 19.850000.\n",
      "Episode: 500. Average reward for episode 17.500000.\n",
      "Episode: 520. Average reward for episode 18.350000.\n",
      "Episode: 540. Average reward for episode 23.050000.\n",
      "Episode: 560. Average reward for episode 21.400000.\n",
      "Episode: 580. Average reward for episode 25.350000.\n",
      "Episode: 600. Average reward for episode 22.000000.\n",
      "Episode: 620. Average reward for episode 22.700000.\n",
      "Episode: 640. Average reward for episode 21.200000.\n",
      "Episode: 660. Average reward for episode 24.050000.\n",
      "Episode: 680. Average reward for episode 21.100000.\n",
      "Episode: 700. Average reward for episode 22.500000.\n",
      "Episode: 720. Average reward for episode 25.350000.\n",
      "Episode: 740. Average reward for episode 24.400000.\n",
      "Episode: 760. Average reward for episode 27.850000.\n",
      "Episode: 780. Average reward for episode 27.200000.\n",
      "Episode: 800. Average reward for episode 23.250000.\n",
      "Episode: 820. Average reward for episode 26.350000.\n",
      "Episode: 840. Average reward for episode 24.800000.\n",
      "Episode: 860. Average reward for episode 26.350000.\n",
      "Episode: 880. Average reward for episode 26.450000.\n",
      "Episode: 900. Average reward for episode 21.750000.\n",
      "Episode: 920. Average reward for episode 22.500000.\n",
      "Episode: 940. Average reward for episode 26.350000.\n",
      "Episode: 960. Average reward for episode 25.500000.\n",
      "Episode: 980. Average reward for episode 32.050000.\n",
      "Task solved in: 980 \n"
     ]
    }
   ],
   "source": [
    "input_y = C.sequence.input_variable(1, np.float32, name=\"input_y\")\n",
    "advantages = C.sequence.input_variable(1, np.float32, name=\"advt\")\n",
    "\n",
    "loss = -C.reduce_mean(C.log(C.square(input_y - probability) + 1e-4) * advantages, axis=0, name='loss')\n",
    "\n",
    "lr = 0.001\n",
    "lr_schedule = C.learning_parameter_schedule_per_sample(lr) \n",
    "sgd = C.sgd([W1, W2], lr_schedule)\n",
    "\n",
    "gradBuffer = dict((var.name, np.zeros(shape=var.shape)) for var in loss.parameters if var.name in ['W1', 'W2', 'b1', 'b2'])\n",
    "\n",
    "xs, hs, label, drs = [], [], [], []\n",
    "running_reward = None\n",
    "reward_sum = 0\n",
    "episode_number = 1\n",
    "\n",
    "observation = env.reset()\n",
    "\n",
    "while episode_number <= TOTAL_EPISODES:\n",
    "    x = np.reshape(observation, [1, STATE_COUNT]).astype(np.float32)\n",
    "\n",
    "    # Run the policy network and get an action to take.\n",
    "    prob = probability.eval(arguments={observations: x})[0][0][0]\n",
    "    action = 1 if np.random.uniform() < prob else 0\n",
    "\n",
    "    xs.append(x)  # observation\n",
    "    # grad that encourages the action that was taken to be taken\n",
    "\n",
    "    y = 1 if action == 0 else 0  # a \"fake label\"\n",
    "    label.append(y)\n",
    "\n",
    "    # step the environment and get new measurements\n",
    "    observation, reward, done, info = env.step(action)\n",
    "    reward_sum += float(reward)\n",
    "\n",
    "    # Record reward (has to be done after we call step() to get reward for previous action)\n",
    "    drs.append(float(reward))\n",
    "\n",
    "    if done:\n",
    "        # Stack together all inputs, hidden states, action gradients, and rewards for this episode\n",
    "        epx = np.vstack(xs)\n",
    "        epl = np.vstack(label).astype(np.float32)\n",
    "        epr = np.vstack(drs).astype(np.float32)\n",
    "        xs, label, drs = [], [], []  # reset array memory\n",
    "\n",
    "        # Compute the discounted reward backwards through time.\n",
    "        discounted_epr = discount_rewards(epr)\n",
    "        # Size the rewards to be unit normal (helps control the gradient estimator variance)\n",
    "        discounted_epr -= np.mean(discounted_epr)\n",
    "        discounted_epr /= np.std(discounted_epr)\n",
    "\n",
    "        # Forward pass\n",
    "        arguments = {observations: epx, input_y: epl, advantages: discounted_epr}\n",
    "        state, outputs_map = loss.forward(arguments, outputs=loss.outputs,\n",
    "                                          keep_for_backward=loss.outputs)\n",
    "\n",
    "        # Backward psas\n",
    "        root_gradients = {v: np.ones_like(o) for v, o in outputs_map.items()}\n",
    "        vargrads_map = loss.backward(state, root_gradients, variables=set([W1, W2]))\n",
    "\n",
    "        for var, grad in vargrads_map.items():\n",
    "            gradBuffer[var.name] += grad\n",
    "\n",
    "        # Wait for some batches to finish to reduce noise\n",
    "        if episode_number % BATCH_SIZE_BASELINE == 0:\n",
    "            grads = {W1: gradBuffer['W1'].astype(np.float32),\n",
    "                     W2: gradBuffer['W2'].astype(np.float32)}\n",
    "            updated = sgd.update(grads, BATCH_SIZE_BASELINE)\n",
    "\n",
    "            # reset the gradBuffer\n",
    "            gradBuffer = dict((var.name, np.zeros(shape=var.shape))\n",
    "                              for var in loss.parameters if var.name in ['W1', 'W2', 'b1', 'b2'])\n",
    "\n",
    "            print('Episode: %d. Average reward for episode %f.' % (episode_number, reward_sum / BATCH_SIZE_BASELINE))\n",
    "\n",
    "            if reward_sum / BATCH_SIZE_BASELINE > REWARD_TARGET:\n",
    "                print('Task solved in: %d ' % episode_number)\n",
    "                break\n",
    "\n",
    "            reward_sum = 0\n",
    "\n",
    "        observation = env.reset()  # reset env\n",
    "        episode_number += 1\n",
    "probability.save('pg.mod')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Solutions**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((4, 10), (10,), (10, 2), (2,), (2,))"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "observation = C.sequence.input_variable(STATE_COUNT, np.float32, name=\"s\")\n",
    "\n",
    "W1 = C.parameter(shape=(STATE_COUNT, H), init=C.glorot_uniform(), name=\"W1\")\n",
    "b1 = C.parameter(shape=H, name=\"b1\")\n",
    "layer1 = C.relu(C.times(observation, W1) + b1)\n",
    "\n",
    "W2 = C.parameter(shape=(H, ACTION_COUNT), init=C.glorot_uniform(), name=\"W2\")\n",
    "b2 = C.parameter(shape=ACTION_COUNT, name=\"b2\")\n",
    "model = C.times(layer1, W2) + b2\n",
    "W1.shape, b1.shape, W2.shape, b2.shape, model.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((4, 10), (10,), (10, 2), (2,), (2,))"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Correspoding layers implementation - Preferred solution\n",
    "def create_model(input):\n",
    "    with C.layers.default_options(init=C.glorot_uniform()):\n",
    "        z = C.layers.Sequential([C.layers.Dense(H, name=\"layer1\"),\n",
    "                                 C.layers.Dense(ACTION_COUNT, name=\"layer2\")])\n",
    "        return z(input)\n",
    "    \n",
    "model = create_model(observation)\n",
    "\n",
    "model.layer1.W.shape, model.layer1.b.shape, model.layer2.W.shape, model.layer2.b.shape, model.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
